package com.ljw.spring.annotation.test;

import com.ljw.spring.annotation.aop.MathCalculator;
import com.ljw.spring.annotation.conf.ConfigOfAOP;
import org.junit.Test;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @FileName IOCTest_AOP
 * @Description TODO
 * @Author ljw
 * @Date 2021/2/3 15:49
 * @Version 1.0
 */
public class IOCTest_AOP {

    @Test
    public void test01(){
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(ConfigOfAOP.class);
        MathCalculator mathCalculator = context.getBean(MathCalculator.class);
        int div = mathCalculator.div(10, 0);
        System.out.println(div);
    }
}
